﻿using System;
using System.Runtime.InteropServices;


namespace HangameAuto02
{
    /// <summary>
    /// 
    /// </summary>
    public static class NativeMethods
    {
        [DllImport("user32.dll", CharSet=CharSet.Auto, SetLastError = true)]
        internal static extern bool RegisterHotKey(IntPtr hwnd, int id, int fsModifiers, int vk);

        [DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
        internal static extern bool UnregisterHotKey(IntPtr hWnd, int id);

        [DllImport("kernel32", SetLastError = true)]
        internal static extern short GlobalAddAtom(string lpString);

        [DllImport("kernel32", SetLastError = true)]
        internal static extern short GlobalDeleteAtom(short nAtom);


        [DllImport("user32.dll", SetLastError = true)]
        [return: MarshalAs(UnmanagedType.Bool)]
        internal static extern bool GetWindowRect(IntPtr hWnd, ref RECT lpRect);

        [DllImport("user32.dll")]
        internal static extern bool SetForegroundWindow(IntPtr hWnd);

        [DllImport("user32.dll")]
        internal static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);

        [DllImport("user32.dll")]
        internal static extern bool IsIconic(IntPtr hWnd);

    }
}
